<template>
	<view class="inventoryTask">
		<!-- 入库任务 -->
		<view class="myTask-list">
			<view class="myTask-list-item" >
				<view class="myTask-list-item-title">{{content.tarkName}}</view>
				<view class="myTask-list-item-title1">发布人：{{content.leader}} </view>
				<view class="myTask-list-item-title1">联系电话：{{content.linkPhone}} </view>
				<view class="myTask-list-item-time">
					{{ content.createTime | dateformat('yyyy-MM-DD  HH:mm') }}
				</view>
				<view class="myTask-list-item-urgent" v-show="content.isUrgent==1">
					紧急
				</view>
			</view>
		</view>
		<view class="inventoryTask-model1">
			<view class="inventoryTask-model1-title">货品列表</view>
			<view class="inventoryTask-model1-tags" v-for="(item,index) in content.baseTaskInfos">
				({{index+1}}) {{item.baseMat.matName}}：{{item.num}}
			</view>
		</view>
		<view class="footerBtn" style="margin-top:70rpx;" v-if="isShowBtn" @click="ApprovedReviewTasks(1)">
			通过审核
		</view>
		<view class="footerBtn" style="background:red;margin-bottom:180rpx;" v-if="isShowBtn" @click="showModal=true">
			驳回
		</view>
		<u-popup :show="showModal" round="12" mode="center" @close="showModal=false">
			<view style="width:690rpx;max-height:800rpx;padding:40rpx;box-sizing: border-box;overflow: auto;">
				<u--textarea v-model="remark" placeholder="请输入驳回原因" ></u--textarea>
				<view class="footerBtn" style="width:300rpx;margin-bottom:40rpx;" @click="ApprovedReviewTasks(2)">
					确认
				</view>
			</view>
		</u-popup>
		<u-loading-page :loading="isShowLoading" bg-color="rgba(4,4,15,0.4000)">加载中...</u-loading-page>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isShowArea:false,
				content:null,
				isShowBtn:false,
				showModal:false,
				remark:'',
				isShowLoading:false
			}
		},
		onLoad(options) {
			if(options.itemDetail){
				let str = decodeURIComponent(options.itemDetail);
				let item = JSON.parse(str);
				this.content = item;
				this.isShowBtn = options.isAuth==0 ? true : false;
			}
		},
		onShow() {
			
		},
		methods: {
			changeTray(){
				this.trayName = e.value[0];
			}
		}
	}
</script>

<style lang="scss">
	page{background:#F2F2F2 ;width:100%;}
	.inventoryTask{
		padding-bottom:180rpx;
		.myTask-list{
			width:690rpx;
			margin:0 auto;
			&-item{
				width:100%;
				height:260rpx;
				background:white;
				border-radius: 24rpx;
				margin-top:20rpx;
				overflow: hidden;
				position: relative;
				&-title{
					width:70%;
					white-space: nowrap;
					text-overflow: ellipsis;
					overflow: hidden;
					font-weight: 600;
					font-size: 30rpx;
					margin-top:20rpx;
					padding:10rpx 30rpx;
				}
				&-title1{
					width:70%;
					white-space: nowrap;
					text-overflow: ellipsis;
					overflow: hidden;
					font-weight: 400;
					font-size: 28rpx;
					padding:10rpx 30rpx;
				}
				&-time{
					font-weight: 400;
					font-size: 26rpx;
					color: #cacaca;
					padding:10rpx 30rpx;
					text-align: right;
				}
				&-urgent{
					position: absolute;
					top:0;
					right:0;
					padding:15rpx;
					background:red;
					color: white;
					font-size: 26rpx;
					border-radius: 0 0 0 24rpx;
				}
			}
		}
		&-model1{
			width:690rpx;
			background:white;
			min-height:250rpx;
			margin:0 auto;
			margin-top:20rpx;
			border-radius: 24rpx;
			padding:0 20rpx;
			overflow: hidden;
			padding-bottom: 20rpx;;
			box-sizing: border-box;
			&-title{
				margin-top:20rpx;
				color:#007aff;
				font-weight: 600;
				font-size: 34rpx;
			}
			&-tags{
				font-weight: 400;
				font-size: 28rpx;
				margin-top: 15rpx;
			}
		}
		.addStore-list-item{
			width: 100%;
			height:88rpx;
			margin:0 auto;
			// padding:0 20rpx;
			box-sizing: border-box;
			// border-top:2rpx solid #F2F2F2;
			display: flex;
			align-items: center;
			justify-content: space-between;
			&-leftContent{
				width:40%;
				color:#007aff;
				font-weight: 600;
				font-size: 34rpx;
			}
			&-input{
				flex:1;
				text-align: right;
				color:#cccfd6;
				font-size: 30rpx;
				display: flex;
				align-items: center;
				flex-direction: row-reverse;
			}
		}
		.footerBtn{
			width:580rpx;
			margin:0 auto;
			padding:15rpx 0;
			background: #007aff;
			text-align: center;
			color: white;
			border-radius: 50rpx;
			margin-top:30rpx;
		}
	}
</style>